function [mar IR]=img_polar1(Im,W,alfa)

   magI = sqrt(real(Im).^2 + imag(Im).^2);
   Itemp=magI;
   
   
   
   [F,C] = size(Im);
   cy          = round(F/2);
   cx          = round(C/2);
   
  
      radius = min(round(F/2),round(C/2))-1;
      angle = 360;
   
  
   img1 =zeros(F,C);
   i     = 1;
   
   Om = (F+1)/2;                  % coordenadas del centro de la imagen
   On = (C+1)/2;
   sx = (F-1)/2;                  % factores de escala
   sy = (C-1)/2;

   
   M=64;
   N=360; 
   R=0.2;
   a=2^(1/M);
   rmin=(a^(-M/2))*R;
   rmax=(a^(M/2))*R;
   
   
   for r=0:radius
      j = 1;
      for ang=0:2*pi/angle: (2*pi) - (2*pi/angle)
         %pcimg(i,j) = img(cy+round(r*sin(a)),cx+round(r*cos(a)));
         %img1(cy+ceil(r*sin(a)),cx+ceil(r*cos(a)))=1;
          
         u=a^(r)*cos(ang);
         v=a^(r)*sin(ang);
          
         radio= sqrt(u^2 + v^2);    
        
         if (radio >=rmin) && (radio <rmax)
               theta = atan2(u,v);
               %theta=(180*theta1)/pi;
               l1 =abs(floor((log(r)-log(R))/log(a))+M/2);
               %l1 =abs(floor((log(r/R)/(log(a)))+M/2)); 
               l2 =abs(floor((N*theta)/pi));
               if(l1>=0 && l1<M) && (l2>=0 && l2<N)
                  mar (l1+1,l2+1) = 1;
                  % IR (xi, yi) = I(l1,l2);
                  img1(i+1,i+1)=Itemp(i+1,j+1).*(1+alfa*W(l1+1,l2+1));
                  % magI(xi+1,yi+1)=Itemp(xi+1,yi+1)+alfa*W(l1+1,l2+1);
               end
            end 
           
           %img1(cy+round(r*sin(a))-1,cx+round(r*cos(a))-1)= 1;
                     
         j = j + 1;
      end
      i = i + 1;
   end
  IR=magI;
   
end